.class public Lcom/tendcloud/tenddata/ab;
.super Ljava/lang/Object;


# static fields
.field static final A:Ljava/lang/String; = "TD_APP_ID"

.field static final B:Ljava/lang/String; = "TD_CHANNEL_ID"

.field public static final DEBUG:Z = false

.field public static final SETTINGS_PERF_ANALYTICS_APPID:Ljava/lang/String; = "TD_appId"

.field public static final SETTINGS_PERF_FILE:Ljava/lang/String; = "TD_app_pefercen_profile"

.field public static final SETTINGS_PREF_PUSH_APPID:Ljava/lang/String; = "TD_push_appId"

.field static final a:Ljava/util/Map;

.field static b:Z = false

.field static c:Landroid/os/Handler; = null

.field static final d:I = 0x1

.field static final e:Ljava/lang/String; = "Android+"

.field static f:Ljava/nio/channels/FileChannel; = null

.field static g:J = 0x0L

.field static h:Z = false

.field static i:Z = false

.field static j:Z = false

.field static final k:Ljava/lang/String; = "+V2.2.48 gp"

.field static final l:Ljava/lang/String; = "TDLog"

.field static m:Ljava/lang/String; = null

.field public static mContext:Landroid/content/Context; = null

.field public static final mPublishPrefix:Ljava/lang/String; = "TD"

.field static final n:Ljava/lang/String; = "TD_analytics_appId"

.field static final o:Ljava/lang/String; = "TD_game_appId"

.field static final p:Ljava/lang/String; = "TD_tracking_appId"

.field static final q:Ljava/lang/String; = "TD_channelId"

.field static final r:Ljava/lang/String; = "TD_sdk_last_send_time"

.field static final s:Ljava/lang/String; = "isDeveloper"

.field static final t:Ljava/lang/String; = "TDOVC+37867ca95f7993d21f057abb8bc66475+TalkingData"

.field static u:Ljava/lang/String; = null

.field static final v:Ljava/lang/String; = "Android+TD+V2.2.48 gp"

.field static w:J = 0x0L

.field static final x:I = 0x1d4c0

.field static y:J = 0x0L

.field static final z:I = 0x64


# direct methods
.method static constructor <clinit>()V
    .locals 4

    const/4 v1, 0x0

    const/4 v3, 0x1

    const/4 v2, 0x0

    new-instance v0, Ljava/util/TreeMap;

    invoke-direct {v0}, Ljava/util/TreeMap;-><init>()V

    sput-object v0, Lcom/tendcloud/tenddata/ab;->a:Ljava/util/Map;

    sput-boolean v2, Lcom/tendcloud/tenddata/ab;->b:Z

    sput-object v1, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    sput-object v1, Lcom/tendcloud/tenddata/ab;->c:Landroid/os/Handler;

    const-wide/16 v0, 0x0

    sput-wide v0, Lcom/tendcloud/tenddata/ab;->g:J

    sput-boolean v2, Lcom/tendcloud/tenddata/ab;->h:Z

    sput-boolean v3, Lcom/tendcloud/tenddata/ab;->i:Z

    sput-boolean v3, Lcom/tendcloud/tenddata/ab;->j:Z

    const-string v0, ""

    sput-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    const-string v0, "Default"

    sput-object v0, Lcom/tendcloud/tenddata/ab;->u:Ljava/lang/String;

    const-wide/16 v0, 0x7530

    sput-wide v0, Lcom/tendcloud/tenddata/ab;->y:J

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static a(Ljava/lang/String;Ljava/lang/String;)V
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    if-eqz v0, :cond_0

    new-instance v0, Landroid/os/Handler;

    sget-object v1, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    sput-object v0, Lcom/tendcloud/tenddata/ab;->c:Landroid/os/Handler;

    :cond_0
    if-eqz p0, :cond_2

    invoke-virtual {p0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_2

    const-string v0, "-"

    invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_2

    const/4 v0, 0x0

    :try_start_0
    const-string v1, "-"

    invoke-virtual {p0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    aget-object v0, v1, v2
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    sput-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    :goto_1
    if-eqz p1, :cond_1

    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

    sput-object p1, Lcom/tendcloud/tenddata/ab;->u:Ljava/lang/String;

    :cond_1
    new-instance v0, Lcom/tendcloud/tenddata/go;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/go;-><init>()V

    invoke-static {v0}, Lcom/tendcloud/tenddata/ca;->execute(Ljava/lang/Runnable;)V

    return-void

    :cond_2
    sput-object p0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    goto :goto_1

    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method static a(Z)V
    .locals 5

    :try_start_0
    sget-object v2, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v3, "TD_app_pefercen_profile"

    const-string v4, "isDeveloper"

    if-eqz p0, :cond_0

    const-wide/16 v0, 0x1

    :goto_0
    invoke-static {v2, v3, v4, v0, v1}, Lcom/tendcloud/tenddata/bu;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;J)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_1
    return-void

    :cond_0
    const-wide/16 v0, 0x0

    goto :goto_0

    :catch_0
    move-exception v0

    goto :goto_1
.end method

.method static a()Z
    .locals 8

    const-wide/16 v6, 0x0

    const/4 v0, 0x0

    :try_start_0
    sget-object v1, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v2, "TD_app_pefercen_profile"

    const-string v3, "isDeveloper"

    const-wide/16 v4, 0x0

    invoke-static {v1, v2, v3, v4, v5}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;J)J
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    move-result-wide v2

    cmp-long v1, v2, v6

    if-eqz v1, :cond_0

    const/4 v0, 0x1

    :cond_0
    :goto_0
    return v0

    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method public static getAdTrackingAppId()Ljava/lang/String;
    .locals 4

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_tracking_appId"

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getAppAnalyticsAppId()Ljava/lang/String;
    .locals 4

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_analytics_appId"

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getAppId(Landroid/content/Context;)Ljava/lang/String;
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    invoke-static {v0}, Lcom/tendcloud/tenddata/ca;->b(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    if-eqz p0, :cond_0

    const-string v0, "TD_app_pefercen_profile"

    const-string v1, "TD_appId"

    const-string v2, ""

    invoke-static {p0, v0, v1, v2}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    :cond_0
    sget-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    return-object v0
.end method

.method public static getChannelId()Ljava/lang/String;
    .locals 4

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_channelId"

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getGameAnalyticsAppId()Ljava/lang/String;
    .locals 4

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_game_appId"

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getPartnerId(Landroid/content/Context;)Ljava/lang/String;
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->u:Ljava/lang/String;

    invoke-static {v0}, Lcom/tendcloud/tenddata/ca;->b(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    sget-object v0, Lcom/tendcloud/tenddata/ab;->u:Ljava/lang/String;

    const-string v1, "Default"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    const-string v0, "TD_app_pefercen_profile"

    const-string v1, "TD_channelId"

    const-string v2, ""

    invoke-static {p0, v0, v1, v2}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/tendcloud/tenddata/ab;->u:Ljava/lang/String;

    :cond_1
    sget-object v0, Lcom/tendcloud/tenddata/ab;->u:Ljava/lang/String;

    return-object v0
.end method

.method public static getPushAppId(Landroid/content/Context;)Ljava/lang/String;
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    invoke-static {v0}, Lcom/tendcloud/tenddata/ca;->b(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    if-eqz p0, :cond_0

    const-string v0, "TD_app_pefercen_profile"

    const-string v1, "TD_push_appId"

    const-string v2, ""

    invoke-static {p0, v0, v1, v2}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    :cond_0
    sget-object v0, Lcom/tendcloud/tenddata/ab;->m:Ljava/lang/String;

    return-object v0
.end method

.method public static setAdTrackingAppId(Ljava/lang/String;)V
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_tracking_appId"

    invoke-static {v0, v1, v2, p0}, Lcom/tendcloud/tenddata/bu;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public static setAppAnalyticsAppId(Ljava/lang/String;)V
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_analytics_appId"

    invoke-static {v0, v1, v2, p0}, Lcom/tendcloud/tenddata/bu;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public static setChannelId(Ljava/lang/String;)V
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_channelId"

    invoke-static {v0, v1, v2, p0}, Lcom/tendcloud/tenddata/bu;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public static setGameAnalyticsAppId(Ljava/lang/String;)V
    .locals 3

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TD_app_pefercen_profile"

    const-string v2, "TD_game_appId"

    invoke-static {v0, v1, v2, p0}, Lcom/tendcloud/tenddata/bu;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method
